package com.controller;

import com.Utils.SexOto;
import com.dao.EchartsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class EchartsController {

    @Autowired
    EchartsMapper echartsMapper;

    @RequestMapping("/getsex")
    public List<SexOto> getsex(){
        List<SexOto> list= echartsMapper.getsex();
    System.out.println(list.size());
        return  list;
    }
    @RequestMapping("/getdepartment")
    public Map<String,List<Object>> getdepartment(){
        Map<String,List<Object>> map=new HashMap<>();
        map.put("department",echartsMapper.getdepartment());
        map.put("departmentnum",echartsMapper.getdepartmentnum());
        return map;
    }
}
